﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Furiant.Figment.Agents;
using Furiant.Figment.Agents.Inventory;
using Furiant.Figment.Core;

namespace Furiant.Figment.Items.Lootable
{
    /// <summary>
    /// Represents an IGameObject which can be picked up and carried by an IHasInventory implementor.
    /// </summary>
    public interface ILootable : IGameObject
    {
        InventoryBase CurrentInventory { get; set; }

        /// <summary>
        /// Gets the player-readable name of a single unit of this instance.
        /// </summary>
        string NameSingle { get; }

        /// <summary>
        /// Gets the player-readable name of a group of this instance.
        /// </summary>
        string NameGrouped { get; }

        /// <summary>
        /// Gets a player-readable name for this instance based on its UnitCount value.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets the player-readable description of this instance.
        /// </summary>
        string Description { get; }

        /// <summary>
        /// Gets the mass of a single unit of this instance.
        /// </summary>
        int UnitMass { get; }

        /// <summary>
        /// Gets the product of the UnitMass and UnitCount values of this instance.
        /// </summary>
        int MassTotal { get; }

        /// <summary>
        /// Gets the maximum number of units of this instance which will be treated as a single group.
        /// </summary>
        int UnitsPerGroup { get; }

        /// <summary>
        /// Gets the number of units of this type represented by this instance.
        /// </summary>
        int UnitCount { get; set; }

        T GetClone<T>() where T : ILootable;

        event EventHandler<InventoryChangedArgs> InventoryChanged;
        event EventHandler<UnitCountChangedArgs> UnitCountChanged;
    }
}
